@page "/Funnel_Chart"

<Funnel Data=data1 Config="config1" />

<Divider>动手实验</Divider>
<DynamicExample @ref="@example">
    <Funnel @ref="@chart" />
</DynamicExample>

@code{

    public IChartComponent chart;
    DynamicExample example;

    protected override void OnAfterRender(bool firstRender)
    {
        base.OnAfterRender(firstRender);
        example.Chart = chart;
    }


    #region 示例1

    object[] data1 = new object[] {
        new  { action= "浏览网站", pv= 50000 },
        new  { action= "放入购物车", pv= 35000 },
        new  { action= "生成订单", pv= 25000 },
        new  { action= "支付", pv= 15000 },
        new  { action= "成交", pv= 8500 },
};

    FunnelConfig config1 = new FunnelConfig()
    {
        XField = "action",
        YField = "pv",
    };

    #endregion 示例1


}

